package com.example.javafx.simple;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Spinner;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class SpinnerExample extends Application {

    @Override
    public void start(Stage primaryStage) {
        // 创建 Spinner 控件
        Spinner<Integer> spinner = new Spinner<>(0, 100, 50); // 范围从 0 到 100，初始值为 50
        
        // 创建布局并添加 Spinner
        VBox root = new VBox(spinner);
        Scene scene = new Scene(root, 300, 100);
        
        primaryStage.setTitle("Spinner Example");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}